package entity;

import java.io.Serializable;
import javax.persistence.CascadeType;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.OneToOne;

@Entity
public class Disease implements Serializable {
    @Id
    private String code;
    private String name;
    private String remark;
    @OneToOne(cascade={CascadeType.PERSIST})
    private ClinicalPathway clinicalPathway;

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getRemark() {
        return remark;
    }

    public void setRemark(String remark) {
        this.remark = remark;
    }

    public ClinicalPathway getClinicalPathway() {
        return clinicalPathway;
    }

    public void setClinicalPathway(ClinicalPathway clinicalPathway) {
        this.clinicalPathway = clinicalPathway;
    }
    
    @Override
    public String toString(){
        return name;
    }
   
}
